# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=tree-sitter-rust
pkgver=0.20.1
pkgrel=1
pkgdesc="Rust grammar for tree-sitter"
url="https://github.com/tree-sitter/tree-sitter-rust"
arch="all"
license="MIT"
makedepends="tree-sitter-dev"
install_if="tree-sitter-grammars"
source="https://github.com/tree-sitter/tree-sitter-rust/archive/v$pkgver/tree-sitter-rust-$pkgver.tar.gz
	$pkgname-7dcef01-highlight-punctuation.patch::https://github.com/tree-sitter/tree-sitter-rust/commit/7dcef019e0215f4635495a64cdf447fb856cd681.patch
	"
options="!check"  # no tests for shared lib

build() {
	abuild-tree-sitter build
}
package() {
	DESTDIR="$pkgdir" abuild-tree-sitter install
}

sha512sums="
de799d76dbcbc7f68ab8560f747c3df3950dd3e640ac60cd44d65a60b23e118e271370e2b1b84d2d830c2d70341b5714f5f52592709ba15f6b164c05f3798f07  tree-sitter-rust-0.20.1.tar.gz
5e4c604f908e786bbce708063ff469911d0ed7b64c0743b773536da8c9e03135d9645f8fb2718e128f18b24f75737af63930883648fa9bfda46a74b348dfecb4  tree-sitter-rust-7dcef01-highlight-punctuation.patch
"
